/**
 * @file    app_control.h
 * @author  yhy
 * @brief   控制模块
 * @version 1.0
 * @date    2025-07-24
 *
 * @copyright Copyright (c) 2025
 *
 */
#ifndef __APP_CONTROL_H__
#define __APP_CONTROL_H__

#include "common_config.h"
#include "inf_bts7020.h"

#include <stdbool.h>
#include <stdint.h>

/**
 * @brief 高策开关，开关类型
 *
 */
typedef enum
{
    SWITCH_TYPE_PUMP  = 0U,
    SWITCH_TYPE_VALVE = 1U,
    SWITCH_TYPE_FANL  = 0U,
    SWITCH_TYPE_FANR  = 1U,
} switch_type_e;

result_e app_control_init(void);
result_e app_control_switch(bts7020_device_e device, switch_type_e switch_type, bool enable);
void     app_control_handle(void);

#endif
